﻿using System;
using MySql.Data;
using MySql.Data.MySqlClient;
using MySql.Data.Types;
using System.Configuration;
using System.Web.UI;
using System.Collections.Generic;

namespace BrsdServer
{
    public partial class _Default : System.Web.UI.Page
    {
        userInfoBLL userInfo = new userInfoBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (!IsPostBack)
            {
                //img1.Src = indexInfo.IMG_1;
                //img1_href.HRef = indexInfo.IMG1_HREF;
                //href1.Text = indexInfo.HREF_1;
                //herf2.Text = indexInfo.HREF_2;
                //herf3.Text = indexInfo.HREF_3;

                //Session["username"] = this.idInput1.Text;
                //Session["pwd"] = this.pwdInput.Text;
                //if ((String)Session["username"] == "" || (String)Session["pwd"] == "")
                //{
                //    String cstext1 = "<script>alert('Hello World')</script>";
                //    Page.ClientScript.RegisterStartupScript(this.GetType(), "ButtonClickScript", cstext1);
                //}
            }
        }
        //protected void loginBtn_Click(object sender, EventArgs e)
        //{
        //    String userName = this.idInput1.Text;
        //    String userPwd = this.pwdInput.Text;
        //    if (userName == "" || userPwd == "")
        //    {
        //        lbltishi.Text = "您输入的用户名和密码不能为空！";
        //        //String str = "<script>alert('您输入的用户名和密码不能为空！')</script>";
        //       // Page.ClientScript.RegisterStartupScript(this.GetType(), "", str);
        //    }
        //    else
        //    {
        //        //查找数据库的用户名和密码是否存在。
        //        int isUserExit = userInfo.FindByUserAndPwd(userName, userPwd);
        //        if (isUserExit == 1)
        //        {
        //            Response.Redirect("manage.aspx");
        //            Session["username"] = userName;
        //            Session["userpwd"] = userPwd;
        //        }
        //        else
        //        {
        //            lbltishi.Text = "您输入的用户名和密码不匹配，请重新输入！";
        //           // String str = "<script>alert('您输入的用户名和密码不匹配，请重新输入！')</script>";
        //           // Page.ClientScript.RegisterStartupScript(this.GetType(), "", str);
        //        }
        //    }
        //}
    }
}
